package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 收货地址
 *
 * @author luoyong
 */
@Data
@ApiModel("收货地址 入参DTO")
public class LyAddressDTO {

    @ApiModelProperty("ID")
    private Long id;

    @Length(max = 63, message = "收货人名称长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("收货人名称")
    private String name;

    @NotNull
    @ApiModelProperty("用户表的用户ID")
    private Integer userId;

    @NotNull
    @ApiModelProperty("行政区域表的省ID")
    private Integer provinceId;

    @NotNull
    @ApiModelProperty("行政区域表的市ID")
    private Integer cityId;

    @NotNull
    @ApiModelProperty("行政区域表的区县ID")
    private Integer areaId;

    @Length(max = 127, message = "具体收货地址长度不能超过127位")
    @NotEmpty
    @ApiModelProperty("具体收货地址")
    private String address;

    @Length(max = 20, message = "手机号码长度不能超过20位")
    @NotEmpty
    @ApiModelProperty("手机号码")
    private String mobile;

    @NotNull
    @ApiModelProperty("是否默认地址")
    private Integer isDefault;

}
